Optimal. Leaf size=89 \[ -\frac {c^2 (a+a \sec (e+f x))^{3/2} \tan (e+f x)}{3 f \sqrt {c-c \sec (e+f x)}}-\frac {c (a+a \sec (e+f x))^{3/2} \sqrt {c-c \sec (e+f x)} \tan (e+f x)}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {4040, 4038}
\begin {gather*} -\frac {c^2 \tan (e+f x) (a \sec (e+f x)+a)^{3/2}}{3 f \sqrt {c-c \sec (e+f x)}}-\frac {c \tan (e+f x) (a \sec (e+f x)+a)^{3/2} \sqrt {c-c \sec (e+f x)}}{3 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 4038
Rule 4040
Rubi steps
\begin {align*} \int \sec (e+f x) (a+a \sec (e+f x))^{3/2} (c-c \sec (e+f x))^{3/2} \, dx &=-\frac {c (a+a \sec (e+f x))^{3/2} \sqrt {c-c \sec (e+f x)} \tan (e+f x)}{3 f}+\frac {1}{3} (2 c) \int \sec (e+f x) (a+a \sec (e+f x))^{3/2} \sqrt {c-c \sec (e+f x)} \, dx\\ &=-\frac {c^2 (a+a \sec (e+f x))^{3/2} \tan (e+f x)}{3 f \sqrt {c-c \sec (e+f x)}}-\frac {c (a+a \sec (e+f x))^{3/2} \sqrt {c-c \sec (e+f x)} \tan (e+f x)}{3 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.42, size = 78, normalized size = 0.88 \begin {gather*} \frac {a c (1+3 \cos (2 (e+f x))) \csc \left (\frac {1}{2} (e+f x)\right ) \sec \left (\frac {1}{2} (e+f x)\right ) \sec ^2(e+f x) \sqrt {a (1+\sec (e+f x))} \sqrt {c-c \sec (e+f x)}}{12 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 2.71, size = 83, normalized size = 0.93
method | result | size |
default | \(\frac {\left (\sin ^{3}\left (f x +e \right )\right ) \left (2 \cos \left (f x +e \right )-1\right ) \sqrt {\frac {a \left (\cos \left (f x +e \right )+1\right )}{\cos \left (f x +e \right )}}\, \left (\frac {c \left (-1+\cos \left (f x +e \right )\right )}{\cos \left (f x +e \right )}\right )^{\frac {3}{2}} a}{3 f \left (-1+\cos \left (f x +e \right )\right )^{3} \cos \left (f x +e \right )}\) | \(83\) |
risch | \(\frac {2 i a c \sqrt {\frac {a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \sqrt {\frac {c \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \left (3 \,{\mathrm e}^{5 i \left (f x +e \right )}+2 \,{\mathrm e}^{3 i \left (f x +e \right )}+3 \,{\mathrm e}^{i \left (f x +e \right )}\right )}{3 \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) f}\) | \(142\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 596 vs.
\(2 (83) = 166\).
time = 0.59, size = 596, normalized size = 6.70 \begin {gather*} \frac {2 \, {\left (6 \, a c \cos \left (3 \, f x + 3 \, e\right ) \sin \left (2 \, f x + 2 \, e\right ) + 9 \, a c \cos \left (f x + e\right ) \sin \left (2 \, f x + 2 \, e\right ) - 9 \, a c \cos \left (2 \, f x + 2 \, e\right ) \sin \left (f x + e\right ) - 3 \, a c \sin \left (f x + e\right ) - {\left (3 \, a c \sin \left (5 \, f x + 5 \, e\right ) + 2 \, a c \sin \left (3 \, f x + 3 \, e\right ) + 3 \, a c \sin \left (f x + e\right )\right )} \cos \left (6 \, f x + 6 \, e\right ) + 9 \, {\left (a c \sin \left (4 \, f x + 4 \, e\right ) + a c \sin \left (2 \, f x + 2 \, e\right )\right )} \cos \left (5 \, f x + 5 \, e\right ) - 3 \, {\left (2 \, a c \sin \left (3 \, f x + 3 \, e\right ) + 3 \, a c \sin \left (f x + e\right )\right )} \cos \left (4 \, f x + 4 \, e\right ) + {\left (3 \, a c \cos \left (5 \, f x + 5 \, e\right ) + 2 \, a c \cos \left (3 \, f x + 3 \, e\right ) + 3 \, a c \cos \left (f x + e\right )\right )} \sin \left (6 \, f x + 6 \, e\right ) - 3 \, {\left (3 \, a c \cos \left (4 \, f x + 4 \, e\right ) + 3 \, a c \cos \left (2 \, f x + 2 \, e\right ) + a c\right )} \sin \left (5 \, f x + 5 \, e\right ) + 3 \, {\left (2 \, a c \cos \left (3 \, f x + 3 \, e\right ) + 3 \, a c \cos \left (f x + e\right )\right )} \sin \left (4 \, f x + 4 \, e\right ) - 2 \, {\left (3 \, a c \cos \left (2 \, f x + 2 \, e\right ) + a c\right )} \sin \left (3 \, f x + 3 \, e\right )\right )} \sqrt {a} \sqrt {c}}{3 \, {\left (2 \, {\left (3 \, \cos \left (4 \, f x + 4 \, e\right ) + 3 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} \cos \left (6 \, f x + 6 \, e\right ) + \cos \left (6 \, f x + 6 \, e\right )^{2} + 6 \, {\left (3 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} \cos \left (4 \, f x + 4 \, e\right ) + 9 \, \cos \left (4 \, f x + 4 \, e\right )^{2} + 9 \, \cos \left (2 \, f x + 2 \, e\right )^{2} + 6 \, {\left (\sin \left (4 \, f x + 4 \, e\right ) + \sin \left (2 \, f x + 2 \, e\right )\right )} \sin \left (6 \, f x + 6 \, e\right ) + \sin \left (6 \, f x + 6 \, e\right )^{2} + 9 \, \sin \left (4 \, f x + 4 \, e\right )^{2} + 18 \, \sin \left (4 \, f x + 4 \, e\right ) \sin \left (2 \, f x + 2 \, e\right ) + 9 \, \sin \left (2 \, f x + 2 \, e\right )^{2} + 6 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.34, size = 89, normalized size = 1.00 \begin {gather*} \frac {{\left (3 \, a c \cos \left (f x + e\right )^{2} - a c\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}}}{3 \, f \cos \left (f x + e\right )^{2} \sin \left (f x + e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.70, size = 86, normalized size = 0.97 \begin {gather*} -\frac {4 \, {\left (3 \, {\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c\right )} c^{4} + 2 \, c^{5}\right )} \sqrt {-a c} a {\left | c \right |} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}{3 \, {\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c\right )}^{3} c^{2} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.14, size = 108, normalized size = 1.21 \begin {gather*} \frac {2\,a\,c\,\sqrt {c-\frac {c}{\cos \left (e+f\,x\right )}}\,\sqrt {\frac {a\,\left (\cos \left (e+f\,x\right )+1\right )}{\cos \left (e+f\,x\right )}}\,\left (2\,\sin \left (e+f\,x\right )+5\,\sin \left (3\,e+3\,f\,x\right )+3\,\sin \left (5\,e+5\,f\,x\right )\right )}{3\,f\,\left (\cos \left (2\,e+2\,f\,x\right )-2\,\cos \left (4\,e+4\,f\,x\right )-\cos \left (6\,e+6\,f\,x\right )+2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________